package server;

public class Utils {
	public static String cleanContent(String str)
	{
		str = str.replaceAll("(class|id)[ ]*[=]{1}[ ]*[\\\'\\\"]{1}[^\\\'\\\"]+[\\\'\\\"]{1}", "");
		str = str.replaceAll("<script[^<]+</script[ ]*>", "");
		return str;
	}
	public static String[] returnString(String content) {

		String[] sbc = content.split(": 1");
		String[] str = new String[sbc.length-1];
		for (int i = 0; i < sbc.length; i++) {
			if (!sbc[i].replaceAll("[,{}\\\"]+", "").trim().equals("")) {
				str[i] = sbc[i].replaceAll("[,{}\\\"]+", "").trim().replaceAll("[&]{3}", ".");
			}
		}
		return str;
	}
}
